#ifndef _FIR_1X_H
#define _FIR_1X_H
#include "hls_dsp.h"

#define FIR_TAP_NUM 69
#define RUN_LENGTH 1300

const unsigned SCALAR_ROUND_MODE          = 0;//AP_TRN, etc;
const unsigned SCALAR_OVERFLOW_MODE       = 2;//AP_WRAP, etc;
const unsigned SCALAR_SATURATION_BITS     = 0;

// input data types
const unsigned INPUT_SCALAR_WIDTH               = 16;
const unsigned INPUT_SCALAR_INTEGER_BITS        = 4;

typedef ap_fixed<
	INPUT_SCALAR_WIDTH,
	INPUT_SCALAR_INTEGER_BITS,
	(ap_q_mode)SCALAR_ROUND_MODE,
	(ap_o_mode)SCALAR_OVERFLOW_MODE,
	SCALAR_SATURATION_BITS> t_input_scalar;
	
// output data types
const unsigned OUTPUT_SCALAR_WIDTH               = 32;
const unsigned OUTPUT_SCALAR_INTEGER_BITS        = 8;

typedef ap_fixed<
	OUTPUT_SCALAR_WIDTH,
	OUTPUT_SCALAR_INTEGER_BITS,
	(ap_q_mode)SCALAR_ROUND_MODE,
	(ap_o_mode)SCALAR_OVERFLOW_MODE,
	SCALAR_SATURATION_BITS> t_output_scalar;


void fir_1x ( const t_input_scalar& din,  t_output_scalar& dout);

extern const t_input_scalar coe[FIR_TAP_NUM];
#endif
